package com.guet;
import java.util.List;
import java.util.Map;

public class MGraph {
    public Map<Integer, vexsinfo> vexs;  //节点数组
    public int arcs[][]=new int[1000][1000];  //邻接矩阵
    public int vexNum=0;
    public int arcsNum=0;
    public  MGraph(){
        vexs=new fileUse().getAllVex();
        List<String> list =new fileUse().getAllEdge();
        vexNum=vexs.size();
        arcsNum=list.size();
        for(String s:list){
            String mess[]=s.split(" ");
            if(mess[0].equals(""))continue;
            System.out.println(mess[0]);
            int start=Integer.parseInt(mess[0]);
            int end=Integer.parseInt(mess[1]);
            int distance=Integer.parseInt(mess[2]);
            arcs[start][end]=distance;
            arcs[end][start]=distance;
        }
    }
}
